package com.huawei;
import java.util.*;
/**
 * Created by Z-hong on 2024/7/16.
 */

public class HJ29 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str_1=scanner.next();
        String str_2=scanner.next();
        System.out.println(set(str_1));
        System.out.println(get(str_2));

    }

    public static String set(String str){
        char[] arr = str.toCharArray();
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]>='A'&&arr[i]<='Z'){
                char a=(char)(arr[i]+32+1);
                arr[i] = arr[i]+32+1>'z'? 'a':a;
            }else if(arr[i]>='a'&&arr[i]<='z'){
                char a=(char)(arr[i]-32+1);
                arr[i] = arr[i]-32+1>'Z'? 'A':a;
            }else if(arr[i]>='0'&&arr[i]<='9'){
                arr[i] = arr[i]=='9'? '0':(char)(arr[i]+1);
            }
        }
        return new String(arr);
    }
    public static String get(String str){
        char[] arr = str.toCharArray();
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]>='A'&&arr[i]<='Z'){
                char a=(char)(arr[i]+32-1);
                arr[i] = arr[i]+32=='a'? 'z':a;
            }else if(arr[i]>='a'&&arr[i]<='z'){
                char a=(char)(arr[i]-32-1);
                arr[i] = arr[i]-32=='A'? 'Z':a;
            }else if(arr[i]>='0'&&arr[i]<='9'){
                arr[i] = arr[i]=='0'? '9':(char)(arr[i]-1);
            }
        }
        return new String(arr);
    }
}
